#pragma once
#include "Communication.h"

class CMessageRecvByEvent : public IMessageRecv
{
	HANDLE m_sendevent;
	HANDLE m_recvevent;

	HANDLE m_mapobj;
	strstream* m_stream;
	BOOL m_bIsClose;
public:
	CMessageRecvByEvent(HANDLE callevent=NULL,HANDLE retevent=NULL,HANDLE mapobj=NULL);
	virtual ~CMessageRecvByEvent();

	virtual BOOL Open(PCHAR* names);
	virtual UINT MessageRecv(IMessageTreament* treament);
	virtual void Close();
};